import request from '@/utils/ruizhiRequest'
// 获取权限模块数据
export const RetrieveAuthSection = () => {
  return request({
    url: '/v1/admin/auth/section/retrieve/',
    method: 'get',
  })
}

// 创建用户模块权限
export const CreateUserSectionAuth = (data) => {
  return request({
    url: '/v1/admin/auth/userSection/create/',
    method: 'post',
    data,
  })
}

// 查询用户模块权限
export const RetrieveUserSectionAuth = (uid) => {
  return request({
    url: '/v1/admin/auth/userSection/retrieve/',
    method: 'get',
    params: { uid },
  })
}

// 创建用户模块品种权限
export const CreateUserSectionVarietyAuth = (data) => {
  return request({
    url: '/v1/admin/auth/userSectionVariety/create/',
    method: 'post',
    data,
  })
}

// 查询用户模块品种权限
export const RetrieveUserSectionVarietyAuth = (uid, sec_key) => {
  return request({
    url: '/v1/admin/auth/userSectionVariety/retrieve/',
    method: 'get',
    params: { uid, sec_key },
  })
}
